<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>雷谛净水器-购买</title>
<script type="text/javascript">
     //调用微信JS api 支付
     function jsApiCall()
     {
         WeixinJSBridge.invoke(
             'getBrandWCPayRequest',
             {{ $jsApiParameters }},
             function(res){
                 WeixinJSBridge.log(res.err_msg);
                 if(res.err_msg == "get_brand_wcpay_request:ok" ) {
                    window.location.href="{{ route('commodities.success') }}";
                 }
             }
         );
     }

     function callpay()
     {
         if (typeof WeixinJSBridge == "undefined"){
             if( document.addEventListener ){
                 document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
             }else if (document.attachEvent){
                 document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                 document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
             }
         }else{
             jsApiCall();
         }
     }
 </script>
 <script>
function pointpay(){

 if(confirm("确定要使用积分兑换吗？"))
 {
    alert('success');
 }
}
</script>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" type="text/css" href="{{ URL::asset('front/style/reset.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ URL::asset('front/style/root.css') }}" />
<link rel="stylesheet" href="{{ URL::asset('front/fonts/font-awesome.min.css') }}">
<script type="text/javascript" src="{{ URL::asset('front/js/jquery.min.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('front/js/toogle.js') }}"></script>
</head>
<body>

    <!-- start header -->
    	<div id="header">
         <img src="{{ URL::asset('front/img/logo.png') }}" width="120" height="40" alt="logo" class="logo" />
         	<a href="javascript:void(0)" onclick="WeixinJSBridge.call('closeWindow');" class="button back">
         	    <img src="{{ URL::asset('front/img/wechat-button.png') }}" width="17" height="18" alt="icon" />
            </a>
         	<a href="#" class="button create"><img src="{{ URL::asset('front/img/user.png') }}" width="16" height="16" alt="icon"/></a>
        <div class="clear"></div>
</div>
    <!-- end header -->


    <!-- start page -->
    <div class="page">


            <div class="simplebox">
            	<h1 class="titleh">微信支付</h1>
                <div class="content">

                {{ Form::model($page, array('method' => 'put', 'route' => array('mounts.update', $mount->id),'id'=>'pages')) }}
                    <h5>购买信息</h5>
                    <ul class="list-plus">
                      <li><b>商品：</b> {{ $buyrecord->Commodity->name }}</li>
                      <li><b>支付信息：</b> @if($buyrecord->state == 2) 已用微信支付 @elseif($buyrecord->state == 1) 已用积分兑换 @else 已取消订单 @endif</li>
                      <li><b>订单号：</b> {{ $buyrecord->out_trade_no }}</li>
                      <li><b>联系电话：</b> {{ $buyrecord->mobile }}</li>
                      <li><b>收获地址：</b> {{ $buyrecord->address }}</li>
                    </ul>


                    <div class="form-line">
                    交易成功！稍后将有工作人员与您联系，或拨打运营商电话{{ $user->mobile }}
                    </div>

                {{ Form::close() }}

                </div>
      </div>






            <!-- start top button -->
            <div class="topbutton"><a href="#header"><span>Top</span></a></div>
            <!-- end top button -->



            <!-- start footer -->
            <div class="footer">
            © 2014 - 2015  邦顶科技 <a href="http://www.o2bang.com">www.o2bang.com</a> </div>
            <!-- end footer -->




    <div class="clear"></div>
    </div>
    <!-- end page -->

<script type="text/javascript" src="{{ URL::asset('front/js/frame.js') }}"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".agreement").click(function(){
    $(".agreement_content").slideToggle();
  });
});

$("#slideup").click(function(){
  $(".agreement_content").slideUp();
});
</script>
</body>
</html>
